package com.swt.agy.backend.model.entity;

import java.util.ArrayList;
import java.util.List;

public class SysRelationExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SysRelationExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Integer value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Integer value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Integer value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Integer value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Integer value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Integer> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Integer> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Integer value1, Integer value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Integer value1, Integer value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdIsNull() {
            addCriterion("start_ontology_id is null");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdIsNotNull() {
            addCriterion("start_ontology_id is not null");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdEqualTo(Integer value) {
            addCriterion("start_ontology_id =", value, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdNotEqualTo(Integer value) {
            addCriterion("start_ontology_id <>", value, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdGreaterThan(Integer value) {
            addCriterion("start_ontology_id >", value, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("start_ontology_id >=", value, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdLessThan(Integer value) {
            addCriterion("start_ontology_id <", value, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdLessThanOrEqualTo(Integer value) {
            addCriterion("start_ontology_id <=", value, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdIn(List<Integer> values) {
            addCriterion("start_ontology_id in", values, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdNotIn(List<Integer> values) {
            addCriterion("start_ontology_id not in", values, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdBetween(Integer value1, Integer value2) {
            addCriterion("start_ontology_id between", value1, value2, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andStartOntologyIdNotBetween(Integer value1, Integer value2) {
            addCriterion("start_ontology_id not between", value1, value2, "startOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdIsNull() {
            addCriterion("end_ontology_id is null");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdIsNotNull() {
            addCriterion("end_ontology_id is not null");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdEqualTo(Integer value) {
            addCriterion("end_ontology_id =", value, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdNotEqualTo(Integer value) {
            addCriterion("end_ontology_id <>", value, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdGreaterThan(Integer value) {
            addCriterion("end_ontology_id >", value, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("end_ontology_id >=", value, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdLessThan(Integer value) {
            addCriterion("end_ontology_id <", value, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdLessThanOrEqualTo(Integer value) {
            addCriterion("end_ontology_id <=", value, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdIn(List<Integer> values) {
            addCriterion("end_ontology_id in", values, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdNotIn(List<Integer> values) {
            addCriterion("end_ontology_id not in", values, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdBetween(Integer value1, Integer value2) {
            addCriterion("end_ontology_id between", value1, value2, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andEndOntologyIdNotBetween(Integer value1, Integer value2) {
            addCriterion("end_ontology_id not between", value1, value2, "endOntologyId");
            return (Criteria) this;
        }

        public Criteria andRelationNameIsNull() {
            addCriterion("relation_name is null");
            return (Criteria) this;
        }

        public Criteria andRelationNameIsNotNull() {
            addCriterion("relation_name is not null");
            return (Criteria) this;
        }

        public Criteria andRelationNameEqualTo(String value) {
            addCriterion("relation_name =", value, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameNotEqualTo(String value) {
            addCriterion("relation_name <>", value, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameGreaterThan(String value) {
            addCriterion("relation_name >", value, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameGreaterThanOrEqualTo(String value) {
            addCriterion("relation_name >=", value, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameLessThan(String value) {
            addCriterion("relation_name <", value, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameLessThanOrEqualTo(String value) {
            addCriterion("relation_name <=", value, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameLike(String value) {
            addCriterion("relation_name like", value, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameNotLike(String value) {
            addCriterion("relation_name not like", value, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameIn(List<String> values) {
            addCriterion("relation_name in", values, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameNotIn(List<String> values) {
            addCriterion("relation_name not in", values, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameBetween(String value1, String value2) {
            addCriterion("relation_name between", value1, value2, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationNameNotBetween(String value1, String value2) {
            addCriterion("relation_name not between", value1, value2, "relationName");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymIsNull() {
            addCriterion("relation_synonym is null");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymIsNotNull() {
            addCriterion("relation_synonym is not null");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymEqualTo(String value) {
            addCriterion("relation_synonym =", value, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymNotEqualTo(String value) {
            addCriterion("relation_synonym <>", value, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymGreaterThan(String value) {
            addCriterion("relation_synonym >", value, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymGreaterThanOrEqualTo(String value) {
            addCriterion("relation_synonym >=", value, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymLessThan(String value) {
            addCriterion("relation_synonym <", value, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymLessThanOrEqualTo(String value) {
            addCriterion("relation_synonym <=", value, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymLike(String value) {
            addCriterion("relation_synonym like", value, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymNotLike(String value) {
            addCriterion("relation_synonym not like", value, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymIn(List<String> values) {
            addCriterion("relation_synonym in", values, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymNotIn(List<String> values) {
            addCriterion("relation_synonym not in", values, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymBetween(String value1, String value2) {
            addCriterion("relation_synonym between", value1, value2, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationSynonymNotBetween(String value1, String value2) {
            addCriterion("relation_synonym not between", value1, value2, "relationSynonym");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionIsNull() {
            addCriterion("relation_direction is null");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionIsNotNull() {
            addCriterion("relation_direction is not null");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionEqualTo(String value) {
            addCriterion("relation_direction =", value, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionNotEqualTo(String value) {
            addCriterion("relation_direction <>", value, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionGreaterThan(String value) {
            addCriterion("relation_direction >", value, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionGreaterThanOrEqualTo(String value) {
            addCriterion("relation_direction >=", value, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionLessThan(String value) {
            addCriterion("relation_direction <", value, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionLessThanOrEqualTo(String value) {
            addCriterion("relation_direction <=", value, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionLike(String value) {
            addCriterion("relation_direction like", value, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionNotLike(String value) {
            addCriterion("relation_direction not like", value, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionIn(List<String> values) {
            addCriterion("relation_direction in", values, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionNotIn(List<String> values) {
            addCriterion("relation_direction not in", values, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionBetween(String value1, String value2) {
            addCriterion("relation_direction between", value1, value2, "relationDirection");
            return (Criteria) this;
        }

        public Criteria andRelationDirectionNotBetween(String value1, String value2) {
            addCriterion("relation_direction not between", value1, value2, "relationDirection");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}